function R=correlacion(Np1,F1)
N=length(Np1);

S1=0;
S2=0;

  for i=1:N
      if(Np1(i)==1)
        S1=S1+F1(i);     
      else
        S2=S2+F1(i);
      end
      
  end
R=S1-S2;
end